home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
utils1
/
js_fie50.arj
/
JS-FIELD.TXT
< prev
next >
Wrap
Text File
|
1994-03-21
|
11KB
|
310 lines
JS-FIELD Utility Program Documentation
(Ver 5.0)
Author: Johnathan Mark Smith
THE OLD DISCLAIMER
This software and manual are sold "as is" and without warranties
as to performance or merchant ability or any other warranties
whether expressed or implied. Because of the various hardware and
software environments into which this program may be put, no
warranty of fitness for a particular purpose is offered.
The user must assume the entire risk of using and evaluating this
program. Any liability of Johnathan Mark Smith Technology will be
limited exclusively to product replacement or refund of purchase
price. If you find these terms unacceptable, do not use this
product.
Introduction
programmers are frequently asked to extract and format
data for the PC. It is not enough for the programmer simply to
pull off the records of interest to the user. Usually, the records must be
formatted to create a set of fields appropriate for "importing"
into the PC worksheet. In a typical company, hundreds of man-hours
are spent each year in creating the small ad-hoc programs required
to generate such data.
The JS-FIELD utility greatly simplifies the task of manipulating
data for use in a PC environment. JS-FIELD provides the following
features:
1. Selective extraction of fields from an input record
2. Data output in either delimited ASCII or non-delimited ASCII
format.
3. Selectable column position ordering of extracted fields.
4. Ability to write the same input data into multiple output
fields.
5. Record selection capability based on record field contents.
6. Optional output record count limit parameter.
7. Formatting of string field with quote marks and numeric
fields with explicit zeros.
8. Suppression of unwanted characters within selected fields.
9. Creation of constant string output fields.
10. Conversion data from EBCDIC to ASCII format.
11. Drops Dollar signs and commas in numeric fields.
The JS-FIELD program must be provided with control information
to govern its execution. This information is read from a control file.
The control file is a standard PC text file that can be created
with any ASCII text editor.
To run JS-FIELD type at the prompt: JS-FIELD [options] <Control file name> .
THE CONTROL FILE
----------------
The first line of the control file identifies the input file name.
The second line of the control file identifies the output file name.
Subsequent lines of the file provide field extraction control information.
Each field exaction control line contains the type of field ,starting byte
position of the field, length of the field and a mask if needed.
The following sample control file illustrates how control
information is provided to the JS-FIELD program.
Contents of a sample JS-FIELD control file, JS-FIELD.CTL:
C:\DATA\STC.TXT
C:\DATA\only100.TXT
c,2,4,<>,John
n,10,1,=,1
C,5,3
N,24,0,<,10000
The input file name is C:\DATA\STC.TXT.
The output file name is C:\DATA\LESS100.TXT.
The first field extract control record (c,2,4,<>,John) indicates that
the data to be extract is a string field(characters to be surrounded by
quotes) will be extracted from byte position 2 and The logical length
of the field is 4 characters. The selection data indicate that the input
record will be discarded if the field value is equal to John.
The second field extract control record (n,10,1,=,1) indicates that the
data to be extract is a numeric field and it will be extracted from
byte position 10 and the logical length of the field is 1 character.
The selection data indicate that the input record will be discarded
if the field value is not equal to 1.
The field extract control record (C,5,3) indicates that the data to be
extract is a string. The leading and trailing spaces will be removed because
you used a Upper case 'C' character. The field will be extracted from
byte position 5 and the logical length of the field is 3 characters
long.
The field extract control record (N,24,7,<,10000) indicates that the data to
be extract is a numeric field and it will removed leading zeros because
you used a upper case 'N' character. The field will be extracted from
byte position 24 and the 0 in the length field tells the program that this
field goes all the way to the end of the record. So you don't have to know
the logical length.
If the field is not less then 10,000 the input record will be discarded.
JS-FIELD Output field type codes
-------------------------------
The following are valid codes for designating output field types:
STRING FIELDS
-------------
1) c (Lower case) String field. (Surrounded by quotes).
2) C (Upper case) String field. (Surrounded by quotes, Leading and
trailing spaces will be removed).
3) u (Lower case) String field. This will convert the string to
all uppercase. (Surrounded by quotes).
4) U (Upper case) String field. This will convert the string to
all uppercase. (Surrounded by quotes, Leading and
trailing spaces will be removed).
5) l (Lower case) String field. This will convert the string to
all lowercase. (Surrounded by quotes).
6) L (Upper case) String field. This will convert the string to
all lowercase. (Surrounded by quotes, Leading and
trailing spaces will be removed).
NUMERIC FIELDS
--------------
1) n (Lower case) Numeric field (Leading and trailing spaces will
be removed).
2) N (Upper case) Numeric field (Leading and trailing spaces will
be removed. also Leading zeros will be removed).
3) f (Lower case) Numeric field (Leading and trailing spaces will
be removed. Also Dollar sign & comma's will
be removed).
4) F (Upper case) Numeric field (Leading and trailing spaces will
be removed. Also Leading zeros will be removed &
Dollar sign & comma's will be removed).
JS-FIELD Output file mask code
_____________________________
The following are valid codes for designating output field mask:
1) <> Take all record not equal to the value of the
data field.
2) < Take all record less then the value of the data
field.
3) > Take all record greater then the value of the
data field.
4) = Take all record equal to the value of the data field.
OPTIONS
-------
1) -bz This option will tell the utility that the input file is not
CRLF and the record length is z long, also make the output file
without CRLF.
2) -Bz This option will tell the utility that the input file is not
CRLF and the record length is z long, also this will add CRLF
to the output file.
3) -ez This option will tell the utility that the input file is EBCDIC
and the record length is z long, also make the output file ASCII
without CRLF.
4) -Ez This option will tell the utility that the input file is EBCDIC
and the record length is z long, also the output file will
be ASCII with CRLF..
5) -A This option will tell the utility that the input file is CRLF
but don't make the output CRLF.
6) -d This will tell the utility to make the output file delimited.
7) -a In some system a delimiter after the last field on the record
will be needed. This option will insert a delimiter after the
last field on each record.
8) -nz This option will tell the utility to only extract z number of
record(s).
9) -s This option will put the utility into fast and stealth mode.
fast and stealth mode will surpress the graph that shows on
the screen when JS-FIELD is executed and the counters will
only be displayed at program termination. The advantage
of using this option is that the utility will run
MUCH, MUCH FASTER.
(Try It !)
10)-X Turns off exiting on input data error.
11) -k To Delete input file on exit.
12) -t To beep on exit.
Registration
I will keep improving the program if I know enough people are
finding it useful.
My registration policy is very flexible. The nominal fee are listed
in the file REGISTER.TXT. If you don't feel you will get your money
worth of use out of JS-FIELD, send whatever it is worth to you.
If you are impoverished and can't afford to pay anything,
enclose a stamped self-addressed envelope
and I will send you a registration.
This is not freeware or public domain. Shareware is simply a means
of marketing commercial software. You are required to register if
you intend to use this program after a reasonable trial period.
When registering, please tell me the version number you have
and where you obtained your copy of JS-FIELD.
See REGISTER.TXT for details.
JS-FIELD should be registered for the maximum number of copies that
can be used simultaneously at your site. Site fees for commercial
users can be negotiated.
If you register for the full fee, and enclose a Shipping and
Handling fee of $3 I will send you the latest versions of JS-FIELD and
Some Free Demo's. if you decide to use it after a trial period. I will
also send other File related shareware programs.
Registered version features
* CUSTOM DEFAULT SETTINGS
* DISCOUNTS ON SHAREWARE
Program Abort
Hitting Control-C (or Control-Break) will terminate the program
immediately.
Distribution
Permission is hereby given to copy and distribute this program
as long as no more than $5 is charged. It must be made clear to
the buyer that this is only a handling charge and not a
registration fee. You must include all files in their original
unmodified form when distributing this program. .
Permission to distribute may be revoked by the Johnathan Mark Smith
at any time for any reason.
YOU MUST NOT DISTRIBUTE ANY COPY WHICH HAS BEEN BRANDED WITH
A REGISTRATION CODE.
All trademarks used in this document are the property of their
owners.
-Johnathan Mark Smith-
Questions or suggestions regarding JS-FIELD should be directed to the author
at the following address:
Johnathan Mark Smith
2039 85 STREET
BROOKLYN, NY 11214
Telephone: 718-373-3886